<template>
	<view class="box">
		<!-- #ifndef H5 -->
		<Nav :isShow="false"></Nav>
		<!-- #endif -->
		<view class="box1">
			<view class="dizhi">
				<view class="scc">
					<text>收货人：</text>
					<text>2131 &nbsp;&nbsp;&nbsp;13234543567</text>
				</view>
				<view class="sce">
					<text>收货地址：</text>
					<text>陕西省西安市未央区</text>
					<span></span>
				</view>
				<view class="userl">
					<u-radio-group
						v-model="radiovalue1"
						placement="column"
						@change="groupChange"
					>
						<u-radio
							:customStyle="{marginBottom: '8px'}"
							v-for="(item, index) in radiolist1"
							:key="index"
							:label="item.name"
							:name="item.name"
							@change="radioChange"
							style="margin-left: 10vw;margin-top: 1vh;"
						></u-radio>
					</u-radio-group>
					<view class="sur">
						编辑
						<view class="ccc">删除</view>
					</view>
				</view>
			</view>
		</view>

		<view class="footer">
			<button
				@click="sun"
				style="background-color: red;color: #fff;border-radius: 15px;width: 300px;"
			>
				添加新增地址
			</button>
		</view>
		<Aside></Aside>
	</view>
</template>

<script>
import Nav from "@/components/top_nav.vue";
import Aside from "@/components/asideNav.vue";
import {edits} from "../../../network/pointer.js";
export default {
	data() {
		return {
			radiolist1: [
				{
					name: "设置默认地址",
					disabled: false
				}
			],
			// u-radio-group的v-model绑定的值如果设置为某个radio的name，就会被默认选中
			radiovalue1: "设置默认地址"
		};
	},
	async created() {
		let res = await edits();
		console.log(res);
	},
	components: {
		Aside,
		Nav
	},
	methods: {
		groupChange(n) {
			console.log("groupChange", n);
		},
		radioChange(n) {
			console.log("radioChange", n);
		},
		sun() {
			uni.navigateTo({
				url: "/pages/users/users_address_list/addres"
			});
		}
	}
};
</script>

<style>
.box1 {
	height: 80vh;
	width: 100vw;
}
.box {
	/* #ifndef H5 */
	margin-top: 5vh;
	/* #endif */
	width: 100vw;
	height: 100vh;
	background-color: #f5f5f5;
	overflow: hidden;
}
.dizhi {
	width: 80vw;
	height: 15vh;
	background-color: #fff;
	margin-left: 10vw;
	border-radius: 15px;
	overflow: hidden;
}
.scc {
	margin-top: 20px;
	margin-left: 20px;
}
.sce {
	margin-top: 20px;
	margin-left: 20px;
	margin-bottom: 10px;
}
span {
	margin-top: 10px;
	display: block;
	width: 80vw;
	border-bottom: 1px solid #ccc;
}
.userl {
	margin-left: -20px;
}
.sur {
	display: flex;
	margin-left: 55vw;
	margin-top: -3vh;
}
.ccc {
	margin-left: 10vw;
}
</style>
